﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostItemsSetup.aspx.cs" Inherits="Hisun.View.CostItemsSetup.CostItemsSetup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">

    <div class =" CommonPage_MainPanel">
    <div class ="CommonPage_Banner"><div class = "CommomPage_Title">成本细项设置</div></div>
    <div class ="CommonPage_Body">
        <table style="width: 100%;">
            <tr>
                <td colspan="3">
                    &nbsp;<asp:Label ID="Label_QueryLabel" runat="server" Text="按名称筛选："></asp:Label>
&nbsp;&nbsp;
                    &nbsp;
                    <asp:TextBox ID="TextBox_QueryText" runat="server"></asp:TextBox>
                     <asp:Button SkinID = "Button" ID="Button_Query" runat="server" OnClick="MyClick" Text="查询" />
                    <asp:Button SkinID = "Button" ID="Button_Add" runat="server" onclick="Button_Add_Click" 
                        Text="增加" />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                  <asp:Panel ID="Panel_GridList" runat="server" Visible="False"> <asp:LinkButton ID="LinkButton_First" runat="server" CommandArgument="First" 
                                    onclick="MyClick">&lt;&lt;</asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="LinkButton_Prev" runat="server" CommandArgument="Prev" 
                                    onclick="MyClick"> &lt;</asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="LinkButton_Next" runat="server" CommandArgument="Next" 
                                    onclick="MyClick">&gt;</asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="LinkButton_Last" runat="server" CommandArgument="Last" 
                                    onclick="MyClick"> &gt;&gt;</asp:LinkButton>
                                <asp:Label ID="Label_Total" runat="server" Text="共：" SkinID="Label"></asp:Label>
                                <asp:Label ID="Label_CurrenPageAndTo" runat="server" Text="页，当前第 页，转到" 
                            SkinID="Label"></asp:Label>
                                <asp:TextBox ID="TextBox_PageIndex" runat="server" Width="26px" 
                            SkinID="TextBox"></asp:TextBox>
                                <asp:Label ID="Label11" runat="server" Text="页" SkinID="Label"></asp:Label>
                                <asp:RangeValidator ID="RangeValidator_PageIndex" runat="server" 
                                    ControlToValidate="TextBox_PageIndex" ErrorMessage="*" MaximumValue="10000" 
                                    MinimumValue="1" Type="Integer"></asp:RangeValidator>
                                <asp:Button SkinID = "Button" ID="Button_PageGo" runat="server" CommandArgument="GotoPage" 
                                    onclick="MyClick" Text="GO" />
                                    <asp:GridView ID="GridView_CostItemsList" runat="server"  
                        SkinID ="GridView"
                        AutoGenerateColumns="False"                        
>
                        <Columns>
                            <asp:BoundField DataField="成本细项ID" HeaderText="成本细项ID" />
                            <asp:BoundField DataField="成本细项名称" HeaderText="成本细项名称" />
                            <asp:BoundField DataField="报表顺序码" HeaderText="报表顺序码" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Button SkinID = "Button" ID="Button_Edit" runat="server" CommandArgument='<%# Eval("成本细项ID") %>' 
                                        oncommand="Button_Edit_Command" Text="编辑" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Button SkinID = "Button" ID="Button_Del" runat="server" oncommand="Button_Del_Command" 
                                        Text="删除" CommandArgument='<%# Eval("成本细项ID") %>' 
                                        onclientclick="return confirm('确定要删除当前行？');" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td colspan="3">
               <asp:Panel ID="Panel_Edit" runat="server">
                   <asp:Label ID="Label12" runat="server" Text="成本细项ID："></asp:Label>
                   <asp:TextBox ID="TextBox_Id" runat="server"></asp:TextBox>
                   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                       ControlToValidate="TextBox_Id" ErrorMessage="只允许两位大写字母" 
                       ValidationExpression="[A-Z][A-Z]" ValidationGroup="Group"></asp:RegularExpressionValidator>
                   <asp:Label ID="Label13" runat="server" Text="成本细项名称："></asp:Label>
                   <asp:TextBox ID="TextBox_Name" runat="server"></asp:TextBox>
                   <br />
                   <asp:Label ID="Label14" runat="server" SkinID="Label" Text="报表顺序码："></asp:Label>
                   <asp:TextBox ID="TextBox_SortCode" runat="server" SkinID="TextBox"></asp:TextBox>
                   <asp:RangeValidator ID="RangeValidator1" runat="server" 
                       ControlToValidate="TextBox_SortCode" ErrorMessage="RangeValidator" 
                       MaximumValue="99" MinimumValue="1" ValidationGroup="Group">顺序码应在1-99之间</asp:RangeValidator>
                   <br />
                   <asp:Button SkinID = "Button" ID="Button_Save" runat="server" onclick="Button_Save_Click" 
                       Text="确定" ValidationGroup="Group" />
                   <asp:Button SkinID = "Button" ID="Button_Cancel" runat="server" Text="取消" 
                       onclick="Button_Cancel_Click" />
               
                    </asp:Panel>
&nbsp;&nbsp;
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="CurrentPage" runat="server" Value="0" />
                    <asp:HiddenField ID="EditFlag" runat="server" Value="0" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
        </div>
    
    </div>
    </form>
</body>
</html>
<% =alert %>